import { request } from '@ruifox-cms/utils'

// 获取用户编写的媒体资源中心的文章，分页
export function selectUserResourcePage(params) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/selectUserResource',
        method: 'post',
        data: params
    })
}
// 获取内容列表
export function getContentPage(data) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/selectPage',
        method: 'post',
        data
    })
}
// 发布内容
export function publishContent(data) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/publish',
        method: 'post',
        data
    })
}
// 修改内容
export function updateContent(data) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/update',
        method: 'post',
        data
    })
}
// 删除内容
export function deleteContent(data) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/delete',
        method: 'post',
        data
    })
}
// 预览内容
export function checkPreview(data) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/checkPreview',
        method: 'post',
        data
    })
}
// 获取内容详情
export function getContentDetail(params) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/selectByCatIdAndDataId',
        method: 'get',
        params
    })
}
// 获取内容详情
export function getContentDetailPlus(params) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/selectByCatIdAndDataIdPlus',
        method: 'get',
        params
    })
}
// 根据栏目id获取内容状态分类统计
export function getContentStatistics(params) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/statistics',
        method: 'get',
        params
    })
}
// 批量查内容详情
export function getContentDetails(data) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/selectList',
        method: 'post',
        data
    })
}
// 分页查询待审核
export function getAuditingPage(params) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/selectAuditingPage',
        method: 'get',
        params
    })
}
// word导入
export function insertContentByImport(data) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/import',
        method: 'post',
        data
    })
}
// 查询归档数据
export function selectPagePigeonhole(params) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/selectPagePigeonhole',
        method: 'get',
        params
    })
}
// 归档
export function pigeonhole(data) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/pigeonhole',
        method: 'post',
        data
    })
}
// 取消归档
export function cancelPigeonhole(data) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/cancelPigeonhole',
        method: 'post',
        data
    })
}
// 修改发布时间、置顶时间等
export function updateContentTiming(data) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/updateTiming',
        method: 'post',
        data
    })
}
// 修改无需审核的属性
export function updateSystemData(data) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/updateSystemData',
        method: 'post',
        data
    })
}
// 批量修改无需审核的属性
export function batchUpdateSystemData(data) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/batchUpdateSystemData',
        method: 'post',
        data
    })
}
// 移动内容到其它栏目
export function moveContent(data) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/move',
        method: 'post',
        data
    })
}
// 批量移动内容到其它栏目
export function batchMoveContent(data) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/batchMove',
        method: 'post',
        data
    })
}
// 收藏内容
export function collectContent(data) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/collect',
        method: 'post',
        data
    })
}
// 批量收藏内容
export function batchCollectContent(data) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/batchCollect',
        method: 'post',
        data
    })
}
// 复制内容
export function copyContent(data) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/copy',
        method: 'post',
        data
    })
}
// 批量复制内容
export function batchCopyContent(data) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/batchCopy',
        method: 'post',
        data
    })
}
// 内容排序
export function updateSort(data) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/updateSort',
        method: 'post',
        data
    })
}
// 一键排序
export function resetSort(data) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/resetSort',
        method: 'post',
        data
    })
}
// 我的发布
export function getMyPublish(params) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/selectPublish',
        method: 'get',
        params
    })
}
// 我的收藏
export function getMyCollect(data) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/selectCollect',
        method: 'post',
        data
    })
}
// 同步站点内容到es搜索引擎
export function syncSiteContentToEs(params) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/dataSynchronize',
        method: 'get',
        params
    })
}
// 我的收藏
export function selectAllContent(data) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/selectAll',
        method: 'post',
        data
    })
}
// 近期发布
export function selectRecentContent(params) {
    return request({
        baseURL: process.env.NODE_ENV == 'development' ? '/build_api' : '/api',
        url: '/build/api/referenceData/selectRecent',
        method: 'get',
        params
    })
}